package com.gxa.stu.util;

import org.apache.commons.lang.StringUtils;

public class ValidateUtil {

    private static final String PHONE_REGEX = "^1(3\\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$";

    public static Boolean isPhone(String phone){
        if(StringUtils.isEmpty(phone)){
            return false;
        }

        if(!phone.matches(PHONE_REGEX)){
            return false;
        }
        return true;
    }
}
